package com.lcx.plugin.neteaseCloud.component.handle;

import com.lcx.plugin.neteaseCloud.music.api.MusicApi;
import com.lcx.plugin.neteaseCloud.music.entity.MusicListEntity;

/**
 * @author daxiong
 * @date 2021/10/13 下午2:16
 */
public class SongDetailHandle {

    /**
     * 处理歌曲详情点击事件
     *
     * @param selectedIndex
     * @param selectedValue
     * @param musicListEntity
     * @return void
     * @author daxiong
     * @date 2021/10/13 下午2:17
     */
    public static void handle(int selectedIndex, String selectedValue, MusicListEntity musicListEntity) {
        switch (selectedIndex) {
            case 0:
                String musicLyric = MusicApi.getMusicLyric(musicListEntity.getSongId());
                System.out.println(musicLyric);
                break;
            case 1:
                SongPlayHandle.print();
                break;
            case 2:
                SongPlayHandle.printProgress();
                break;
            case 5:
                // 添加到队列
                SongQueueHandle.add2Queue(musicListEntity, null);
                break;
            case 6:
                // 下一首播放
                SongPlayHandle.add2Next(musicListEntity);
                break;
            default:
                break;
        }
    }

}
